#ifndef __WT931_H
#define __WT931_H
#include "wit_c_sdk.h"
#include "delay.h"

static volatile char s_cDataUpdate = 0, s_cCmd = 0xff;
#define ACC_UPDATE		0x01
#define GYRO_UPDATE		0x02
#define ANGLE_UPDATE	0x04
#define MAG_UPDATE		0x08
#define READ_UPDATE		0x80

void UseCmdProcess(void);
void UseAutoScanSensor(void);
void UseSensorUartSend(uint8_t *p_data, uint32_t uiSize);
void UseSensorDataUpdata(uint32_t uiReg, uint32_t uiRegNum);
void UseDelayms(uint16_t ucMs);
void GetWT391Data(u8 Used_flag);
void SumAcc(u8 Used_flag);
void SportMotion(float SumAccMean,u8 Used_flag);


void CopeCmdData(unsigned char ucData);
static void CmdProcess(void);
static void AutoScanSensor(void);
static void SensorUartSend(uint8_t *p_data, uint32_t uiSize);
static void SensorDataUpdata(uint32_t uiReg, uint32_t uiRegNum);
static void Delayms(uint16_t ucMs);





#endif


